import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import ElementUI from "element-ui";
import "./assets/css/element-variables.scss";
import $ from "jquery";
import "jquery-ui-dist/jquery-ui";
import "jquery-ui-dist/jquery-ui.min.css";

Vue.use(ElementUI, {
    size: "small",
    zIndex: 3000,
});

import JsonP from "jsonp";
import VueResource from "vue-resource";
Vue.use(VueResource);

import html2canvas from "html2canvas";

import "./nprogress"; // permission control

import "./utils/jurisdiction"; // 按钮权限操作

Vue.config.productionTip = false;

// 全局请求or api
import request from "./utils/request";
import api from "./utils/api";
import napi from "./utils/newApi";
Vue.prototype.$request = request;
Vue.prototype.$api = api;
Vue.prototype.$napi = napi;
// 滚动条插件
import vuescroll from "vuescroll"; //引入vuescroll
import "vuescroll/dist/vuescroll.css"; //引入vuescroll样式
Vue.use(vuescroll); //使用
// 全局变量
import globalData from "./utils/global";
Vue.prototype.$globalData = globalData;

import VueWechatTitle from "vue-wechat-title";
Vue.use(VueWechatTitle);
// 全局分页组件
import pagination from "./components/pagination";
Vue.component("pagina-tion", pagination);

import mars3d from "./components/mars3d.vue";
Vue.component("mars3d", mars3d);
// 四级联动
import addressCascader from "./components/address";
Vue.component("address-Cascader", addressCascader);
// 暂无数据
import noData from "./components/noData";
Vue.component("noData", noData);
// 地图
import bigeMap from "./utils/bigeMap.js";
Vue.prototype.$BIGEMAP = new bigeMap();
// 四级联动
import { pcaa } from "area-data-vue";
import "area-linkage-vue/dist/index.css";
import AreaLinkageVue from "area-linkage-vue";
Vue.prototype.$pcaa = pcaa;

Vue.use(AreaLinkageVue);
// webSocket
import "./utils/webSocket";

// import './utils/address'
// import addressListData from './utils/address'
// Vue.prototype.$addressListData = addressListData;

import BaiduMap from "vue-baidu-map";

Vue.use(BaiduMap, {
    // ak 是在百度地图开发者平台申请的密钥 详见 http://lbsyun.baidu.com/apiconsole/key */
    ak: "SiEAmB39HjQ0FgSUORSG4bFiiXhqpIvw",
});

import { getDictionaryByType, queryNameDuplicate, duplicateQueryGroupName } from "./utils/dictionary";
Vue.prototype.getDictionaryByType = getDictionaryByType;
Vue.prototype.queryNameDuplicate = queryNameDuplicate;
Vue.prototype.duplicateQueryGroupName = duplicateQueryGroupName;

new Vue({
    router,
    store,
    render: (h) => h(App),
}).$mount("#app");
